// 引入 request 方法，假设 request 方法已经定义在某个工具文件中
import request from '/@/utils/request';
 
// 定义 API 路径枚举
enum Api {
    ClearLogOp = '/SysLogOp/clear',
    LogOpDetail = '/SysLogOp/Data?id={id}',
    ExportLogOp = '/SysLogOp/ExportLogOp',
    LogOpPage = '/SysLogOp/pages',
}

// 清空操作日志
export const apiSysLogOpClearPost = () =>
    request({
        url: Api.ClearLogOp,
        method: 'delete',
    });

// 获取操作日志详情
export const apiSysLogOpDetailIdGet = (id: number) =>
    request({
        url: Api.LogOpDetail.replace('{id}', id.toString()),
        method: 'get',
    });

// 导出操作日志
export const apiSysLogOpExportPost = (body: any) =>
    request({
        url: Api.ExportLogOp,
        method: 'post',
        data: body,
    });

// 获取操作日志分页列表
export const apiSysLogOpPagePost = (body: any) =>
    request({
        url: Api.LogOpPage,
        method: 'get',
        data: body,
    });